package com.changgou.goods.dao;

import com.changgou.goods.pojo.Para;
import com.changgou.goods.pojo.Spec;
import com.changgou.goods.pojo.Template;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface Temp_spec_paraMapper extends Mapper<Template> {

    //规格
    @Select("SELECT COUNT(*) seq FROM tb_template t INNER JOIN tb_spec s ON t.id=s.template_id GROUP BY t.id")
    List<Spec> findSpec();

    //参数
    @Select("SELECT COUNT(*) seq FROM tb_template t INNER JOIN tb_para p ON t.id=p.template_id GROUP BY t.id")
    List<Para> findPara();
}
